<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" >

  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/turbolinks/5.2.0/turbolinks.js" integrity="sha256-iM4Yzi/zLj/IshPWMC1IluRxTtRjMqjPGd97TZ9yYpU=" crossorigin="anonymous"></script>
  <link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Cousine|Inconsolata" rel="stylesheet">
  <link rel="shortcut icon" type="image/png" href="/favicon.png">

  <link rel="stylesheet" href="/css/style.css">
  <link rel="stylesheet" href="/css/css/fontawesome-all.min.css">
  <link rel="stylesheet" href="/css/css/work-sans-v7.css">
  <script src="/js/main.js"></script>

  <!-- Begin Jekyll SEO tag v2.6.1 -->
<title>PY: Get Account Comments | Hive Developer</title>
<meta name="generator" content="Jekyll v4.0.0" />
<meta property="og:title" content="PY: Get Account Comments" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="Fetch list of comments made by account on posts or comments." />
<meta property="og:description" content="Fetch list of comments made by account on posts or comments." />
<link rel="canonical" href="get_account_comments.html" />
<meta property="og:url" content="get_account_comments.html" />
<meta property="og:site_name" content="Hive Developer" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2020-08-26T11:52:22-07:00" />
<script type="application/ld+json">
{"description":"Fetch list of comments made by account on posts or comments.","mainEntityOfPage":{"@type":"WebPage","@id":"get_account_comments.html"},"@type":"BlogPosting","url":"get_account_comments.html","headline":"PY: Get Account Comments","dateModified":"2020-08-26T11:52:22-07:00","datePublished":"2020-08-26T11:52:22-07:00","@context":"https://schema.org"}</script>
<!-- End Jekyll SEO tag -->


  
</head>
<body>
<header>
  <h1>
    <button type="button" class="open-nav" id="open-nav"></button>
    <a href="/"  class="logo-link"><img src="/images/logotype_black.svg" height="40" alt="Hive Developer logo"></a>
  </h1>

  
  <form action="/search/" method="get">
    <input type="text" name="q" id="search-input" placeholder="Search">
    <input type="submit" value="Search" style="display: none;">
  </form>
  

  <div id="sidebar" class="sidebar">
	
	
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/">
		<h6 class="ctrl-nav-section title">Introduction</h6>
		<ul class="cont-nav-section content">
			
				
					
					
						
						<li><a href="/#introduction-welcome">Welcome to Hive</a></li>
						
					
				
			
		</ul>
	</section>
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/quickstart/">
		<h6 class="ctrl-nav-section title">Quickstart</h6>
		<ul class="cont-nav-section content">
			
				
					
					
						
						<li><a href="/quickstart/#quickstart-choose-library">Choose Library</a></li>
						
					
						
						<li><a href="/quickstart/#quickstart-hive-full-nodes">Hive Nodes</a></li>
						
					
						
						<li><a href="/quickstart/#quickstart-testnet">Hive Testnet</a></li>
						
					
				
			
		</ul>
	</section>
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/tutorials/">
		<h6 class="ctrl-nav-section title">Tutorials</h6>
		<ul class="cont-nav-section content">
			
				
					
						<li><a href="/tutorials/#tutorials-javascript">Javascript</a></li>
					
				
					
						<li><a href="/tutorials/#tutorials-python">Python</a></li>
					
				
					
						<li><a href="/tutorials/#tutorials-ruby">Ruby</a></li>
					
				
					
						<li><a href="/tutorials/#tutorials-recipes">Recipes</a></li>
					
				
			
		</ul>
	</section>
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/services/">
		<h6 class="ctrl-nav-section title">Services</h6>
		<ul class="cont-nav-section content">
			
				
					
					
						
						<li><a href="/services/#services-hive-blog">hive.blog</a></li>
						
					
						
						<li><a href="/services/#services-hivesigner">HiveSigner</a></li>
						
					
						
						<li><a href="/services/#services-jussi">Jussi</a></li>
						
					
						
						<li><a href="/services/#services-imagehoster">ImageHoster</a></li>
						
					
						
						<li><a href="/services/#services-dhf">DHF</a></li>
						
					
				
			
		</ul>
	</section>
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/apidefinitions/">
		<h6 class="ctrl-nav-section title">Appbase API</h6>
		<ul class="cont-nav-section content">
			
				
					
					
						
						<li><a href="/apidefinitions/#apidefinitions-condenser-api">Condenser Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-bridge">Bridge</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-account-by-key-api">Account By Key Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-account-history-api">Account History Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-block-api">Block Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-database-api">Database Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-debug-node-api">Debug Node Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-follow-api">Follow Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-jsonrpc">Jsonrpc</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-market-history-api">Market History Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-network-broadcast-api">Network Broadcast Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-rc-api">Rc Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-reputation-api">Reputation Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-rewards-api">Rewards Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-tags-api">Tags Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-transaction-status-api">Transaction Status Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-witness-api">Witness Api</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-broadcast-ops">Broadcast Ops</a></li>
						
					
						
						<li><a href="/apidefinitions/#apidefinitions-broadcast-ops-communities">Broadcast Ops Communities</a></li>
						
					
				
			
		</ul>
	</section>
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/resources/">
		<h6 class="ctrl-nav-section title">Resources</h6>
		<ul class="cont-nav-section content">
			
				
					
					
						
						<li><a href="/resources/#resources-overview">Overview</a></li>
						
					
						
						<li><a href="/resources/#resources-client-libs">Client Libraries</a></li>
						
					
						
						<li><a href="/resources/#resources-bluepaper">Bluepaper</a></li>
						
					
						
						<li><a href="/resources/#resources-whitepaper">Whitepaper</a></li>
						
					
						
						<li><a href="/resources/#resources-tools">Tools</a></li>
						
					
						
						<li><a href="/resources/#resources-hivesigner-libs">Hivesigner Libs</a></li>
						
					
						
						<li><a href="/resources/#resources-hive-keychain">Hive Keychain</a></li>
						
					
						
						<li><a href="/resources/#resources-developeradvocate">Community & Help</a></li>
						
					
				
			
		</ul>
	</section>
	
		
    <section class="pnl-main-nav-section main-nav-section" url="/glossary/">
		<h6 class="ctrl-nav-section title">Glossary</h6>
		<ul class="cont-nav-section content">
			
				
					
					
						
						<li><a href="/glossary/#glossary-chain-basics">Chain Basics</a></li>
						
					
						
					
						
						<li><a href="/glossary/#glossary-governance">Governance</a></li>
						
					
						
						<li><a href="/glossary/#glossary-transactions">Transactions</a></li>
						
					
						
						<li><a href="/glossary/#glossary-api">API</a></li>
						
					
						
						<li><a href="/glossary/#glossary-market">Market</a></li>
						
					
				
			
		</ul>
	</section>
	
</div>



  <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
</header>
<div class="main" id="top">
  <div class="hero">
    <h1 class="hero__h1">Hive Developer Portal </h1>
    <img class="hero__img" src="/images/honey-comb-92.png" style="position: relative; top: 10px;" />
  </div>
  <section id="tutorials-python-get-account-comments" class="row tutorials-python-get-account-comments">
	<h3>
		<a id="tutorials-python-get-account-comments">
			PY: Get Account Comments
			
		</a>
	</h3>
	
		<span class="description"><p>Fetch list of comments made by account on posts or comments.</p>
</span>
	

	<p><span class="fa-pull-left top-of-tutorial-repo-link"><span class="first-word">Full</span>, runnable src of <a href="https://gitlab.syncad.com/hive/devportal/-/tree/master/tutorials/python/tutorials/09_get_account_comments">Get Account Comments</a> can be downloaded as part of: <a href="https://gitlab.syncad.com/hive/devportal/-/tree/master/tutorials/python">tutorials/python</a>.</span>
<br /></p>

<p>In this tutorial will explain and show you how to access the <strong>Steem</strong> blockchain using the <a href="https://github.com/steemit/steem-python">steem-python</a> library to fetch list of posts to randomize account list and get replies of selected account.</p>

<h2 id="intro">Intro</h2>

<p>Steem python library has built-in function to get comments list made by specific account. Since we don’t have predefined account list, we will fetch newly created posts and show their authors for selection and give option to choose one account to get its comments. <code class="highlighter-rouge">get_discussions_by_comments</code> function fetches list of comments made by account. Note that <code class="highlighter-rouge">get_discussions_by_created</code> filter is used for fetching 5 posts and after selection of its author tutorial uses <code class="highlighter-rouge">author</code> of the post to fetch that account’s comments.</p>

<h2 id="steps">Steps</h2>

<ol>
  <li><a href="#app-setup"><strong>App setup</strong></a> - Library install and import</li>
  <li><a href="#post-list"><strong>Post list</strong></a> - List of posts to select from created filter</li>
  <li><a href="#comments-list"><strong>Comments list</strong></a> - Get comments list made by selected account</li>
  <li><a href="#print-output"><strong>Print output</strong></a> - Print results in output</li>
</ol>

<h4 id="1-app-setup-">1. App setup <a name="app-setup"></a></h4>

<p>In this tutorial we use 3 packages, <code class="highlighter-rouge">pick</code> - helps us to select filter interactively. <code class="highlighter-rouge">steem</code> - steem-python library, interaction with Blockchain. <code class="highlighter-rouge">pprint</code> - print results in better format.</p>

<p>First we import all three library and initialize Steem class</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    <span class="kn">import</span> <span class="nn">pprint</span>
    <span class="kn">from</span> <span class="nn">pick</span> <span class="kn">import</span> <span class="n">pick</span>
    <span class="c1"># initialize Steem class
</span>    <span class="kn">from</span> <span class="nn">steem</span> <span class="kn">import</span> <span class="n">Steem</span>

    <span class="n">s</span> <span class="o">=</span> <span class="n">Steem</span><span class="p">()</span>
</code></pre></div></div>

<h4 id="2-post-list-">2. Post list <a name="post-list"></a></h4>

<p>Next we will fetch and make list of accounts and setup <code class="highlighter-rouge">pick</code> properly.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code>    <span class="n">query</span> <span class="o">=</span> <span class="p">{</span>
      <span class="s">"limit"</span><span class="p">:</span><span class="mi">5</span><span class="p">,</span> <span class="c1">#number of posts
</span>      <span class="s">"tag"</span><span class="p">:</span><span class="s">""</span> <span class="c1">#tag of posts
</span>    <span class="p">}</span>
    <span class="c1">#author list from created post list to randomize account list
</span>    <span class="n">posts</span> <span class="o">=</span> <span class="n">s</span><span class="o">.</span><span class="n">get_discussions_by_created</span><span class="p">(</span><span class="n">query</span><span class="p">)</span>

    <span class="n">title</span> <span class="o">=</span> <span class="s">'Please choose account: '</span>
    <span class="n">options</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="c1">#accounts list
</span>    <span class="k">for</span> <span class="n">post</span> <span class="ow">in</span> <span class="n">posts</span><span class="p">:</span>
      <span class="n">options</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">post</span><span class="p">[</span><span class="s">"author"</span><span class="p">])</span>

    <span class="c1"># get index and selected account name
</span>    <span class="n">option</span><span class="p">,</span> <span class="n">index</span> <span class="o">=</span> <span class="n">pick</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">title</span><span class="p">)</span>
</code></pre></div></div>

<p>This will show us list of accounts to select in terminal/command prompt. And after selection we will get account name as a <code class="highlighter-rouge">option</code> variable.</p>

<h4 id="3-comments-list-">3. Comments list <a name="comments-list"></a></h4>

<p>Next we will form another query to get comments list of account</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="n">query2</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">"limit"</span><span class="p">:</span><span class="mi">5</span><span class="p">,</span> <span class="c1">#number of comments
</span>    <span class="s">"start_author"</span><span class="p">:</span><span class="n">option</span> <span class="c1">#selected user
</span>  <span class="p">}</span>

  <span class="c1"># get comments of selected account
</span>  <span class="n">comments</span> <span class="o">=</span> <span class="n">s</span><span class="o">.</span><span class="n">get_discussions_by_comments</span><span class="p">(</span><span class="n">query2</span><span class="p">)</span>
</code></pre></div></div>

<p>Note that <code class="highlighter-rouge">start_author</code> variable in query should be account name so that <code class="highlighter-rouge">get_discussions_by_comments</code> can provide us corrent information.</p>

<h4 id="4-print-output-">4. Print output <a name="print-output"></a></h4>

<p>Next, we will print result, comments of selected account and details of each comment.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="c1"># print comment details for selected account
</span>  <span class="n">pprint</span><span class="o">.</span><span class="n">pprint</span><span class="p">(</span><span class="n">comments</span><span class="p">)</span>
  <span class="n">pprint</span><span class="o">.</span><span class="n">pprint</span><span class="p">(</span><span class="s">"Selected: "</span><span class="o">+</span><span class="n">option</span><span class="p">)</span>
</code></pre></div></div>

<p>The example of result returned from the service is a <code class="highlighter-rouge">JSON</code> object with the following properties:</p>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[{</span><span class="err">'abs_rshares':</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
  </span><span class="err">'active':</span><span class="w"> </span><span class="err">'</span><span class="mi">2018-06-21</span><span class="err">T</span><span class="mi">06</span><span class="err">:</span><span class="mi">48</span><span class="err">:</span><span class="mi">57</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'active_votes':</span><span class="w"> </span><span class="p">[],</span><span class="w">
  </span><span class="err">'allow_curation_rewards':</span><span class="w"> </span><span class="err">True</span><span class="p">,</span><span class="w">
  </span><span class="err">'allow_replies':</span><span class="w"> </span><span class="err">True</span><span class="p">,</span><span class="w">
  </span><span class="err">'allow_votes':</span><span class="w"> </span><span class="err">True</span><span class="p">,</span><span class="w">
  </span><span class="err">'author':</span><span class="w"> </span><span class="err">'rakibmaruf</span><span class="mi">24</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'author_reputation':</span><span class="w"> </span><span class="err">'</span><span class="mi">115387353393</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'author_rewards':</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
  </span><span class="err">'beneficiaries':</span><span class="w"> </span><span class="p">[],</span><span class="w">
  </span><span class="err">'body':</span><span class="w"> </span><span class="s2">"That extra push will take you Back- That's my opinion ."</span><span class="p">,</span><span class="w">
  </span><span class="err">'body_length':</span><span class="w"> </span><span class="mi">55</span><span class="p">,</span><span class="w">
  </span><span class="err">'cashout_time':</span><span class="w"> </span><span class="err">'</span><span class="mi">2018-06-28</span><span class="err">T</span><span class="mi">06</span><span class="err">:</span><span class="mi">48</span><span class="err">:</span><span class="mi">57</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'category':</span><span class="w"> </span><span class="err">'life'</span><span class="p">,</span><span class="w">
  </span><span class="err">'children':</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
  </span><span class="err">'children_abs_rshares':</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
  </span><span class="err">'created':</span><span class="w"> </span><span class="err">'</span><span class="mi">2018-06-21</span><span class="err">T</span><span class="mi">06</span><span class="err">:</span><span class="mi">48</span><span class="err">:</span><span class="mi">57</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'curator_payout_value':</span><span class="w"> </span><span class="err">'</span><span class="mf">0.000</span><span class="w"> </span><span class="err">SBD'</span><span class="p">,</span><span class="w">
  </span><span class="err">'depth':</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w">
  </span><span class="err">'id':</span><span class="w"> </span><span class="mi">53788647</span><span class="p">,</span><span class="w">
  </span><span class="err">'json_metadata':</span><span class="w"> </span><span class="err">'</span><span class="p">{</span><span class="nl">"tags"</span><span class="p">:[</span><span class="s2">"life"</span><span class="p">],</span><span class="nl">"app"</span><span class="p">:</span><span class="s2">"steemit/0.1"</span><span class="p">}</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'last_payout':</span><span class="w"> </span><span class="err">'</span><span class="mi">1970-01-01</span><span class="err">T</span><span class="mi">00</span><span class="err">:</span><span class="mi">00</span><span class="err">:</span><span class="mi">00</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'last_update':</span><span class="w"> </span><span class="err">'</span><span class="mi">2018-06-21</span><span class="err">T</span><span class="mi">06</span><span class="err">:</span><span class="mi">48</span><span class="err">:</span><span class="mi">57</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'max_accepted_payout':</span><span class="w"> </span><span class="err">'</span><span class="mf">1000000.000</span><span class="w"> </span><span class="err">SBD'</span><span class="p">,</span><span class="w">
  </span><span class="err">'max_cashout_time':</span><span class="w"> </span><span class="err">'</span><span class="mi">1969-12-31</span><span class="err">T</span><span class="mi">23</span><span class="err">:</span><span class="mi">59</span><span class="err">:</span><span class="mi">59</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'net_rshares':</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
  </span><span class="err">'net_votes':</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
  </span><span class="err">'parent_author':</span><span class="w"> </span><span class="err">'blazing'</span><span class="p">,</span><span class="w">
  </span><span class="err">'parent_permlink':</span><span class="w"> </span><span class="err">'that-extra-push-will-take-you-forward'</span><span class="p">,</span><span class="w">
  </span><span class="err">'pending_payout_value':</span><span class="w"> </span><span class="err">'</span><span class="mf">0.000</span><span class="w"> </span><span class="err">SBD'</span><span class="p">,</span><span class="w">
  </span><span class="err">'percent_steem_dollars':</span><span class="w"> </span><span class="mi">10000</span><span class="p">,</span><span class="w">
  </span><span class="err">'permlink':</span><span class="w"> </span><span class="err">'re-blazing-that-extra-push-will-take-you-forward</span><span class="mi">-20180621</span><span class="err">t</span><span class="mi">064855012</span><span class="err">z'</span><span class="p">,</span><span class="w">
  </span><span class="err">'promoted':</span><span class="w"> </span><span class="err">'</span><span class="mf">0.000</span><span class="w"> </span><span class="err">SBD'</span><span class="p">,</span><span class="w">
  </span><span class="err">'reblogged_by':</span><span class="w"> </span><span class="p">[],</span><span class="w">
  </span><span class="err">'replies':</span><span class="w"> </span><span class="p">[],</span><span class="w">
  </span><span class="err">'reward_weight':</span><span class="w"> </span><span class="mi">10000</span><span class="p">,</span><span class="w">
  </span><span class="err">'root_author':</span><span class="w"> </span><span class="err">'blazing'</span><span class="p">,</span><span class="w">
  </span><span class="err">'root_permlink':</span><span class="w"> </span><span class="err">'that-extra-push-will-take-you-forward'</span><span class="p">,</span><span class="w">
  </span><span class="err">'root_title':</span><span class="w"> </span><span class="err">'That</span><span class="w"> </span><span class="err">extra</span><span class="w"> </span><span class="err">push</span><span class="w"> </span><span class="err">will</span><span class="w"> </span><span class="err">take</span><span class="w"> </span><span class="err">you</span><span class="w"> </span><span class="err">forward</span><span class="w"> </span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'title':</span><span class="w"> </span><span class="err">''</span><span class="p">,</span><span class="w">
  </span><span class="err">'total_payout_value':</span><span class="w"> </span><span class="err">'</span><span class="mf">0.000</span><span class="w"> </span><span class="err">SBD'</span><span class="p">,</span><span class="w">
  </span><span class="err">'total_pending_payout_value':</span><span class="w"> </span><span class="err">'</span><span class="mf">0.000</span><span class="w"> </span><span class="err">STEEM'</span><span class="p">,</span><span class="w">
  </span><span class="err">'total_vote_weight':</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
  </span><span class="err">'url':</span><span class="w"> </span><span class="err">'/life/@blazing/that-extra-push-will-take-you-forward#@rakibmaruf</span><span class="mi">24</span><span class="err">/re-blazing-that-extra-push-will-take-you-forward</span><span class="mi">-20180621</span><span class="err">t</span><span class="mi">064855012</span><span class="err">z'</span><span class="p">,</span><span class="w">
  </span><span class="err">'vote_rshares':</span><span class="w"> </span><span class="mi">0</span><span class="p">},</span><span class="w">
 </span><span class="p">{</span><span class="err">'abs_rshares':</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
  </span><span class="err">'active':</span><span class="w"> </span><span class="err">'</span><span class="mi">2018-06-01</span><span class="err">T</span><span class="mi">18</span><span class="err">:</span><span class="mi">36</span><span class="err">:</span><span class="mi">06</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'active_votes':</span><span class="w"> </span><span class="p">[{</span><span class="err">'percent':</span><span class="w"> </span><span class="mi">200</span><span class="p">,</span><span class="w">
                    </span><span class="err">'reputation':</span><span class="w"> </span><span class="err">'</span><span class="mi">26818436016691</span><span class="err">'</span><span class="p">,</span><span class="w">
                    </span><span class="err">'rshares':</span><span class="w"> </span><span class="err">'</span><span class="mi">16086534528</span><span class="err">'</span><span class="p">,</span><span class="w">
                    </span><span class="err">'time':</span><span class="w"> </span><span class="err">'</span><span class="mi">2018-06-01</span><span class="err">T</span><span class="mi">21</span><span class="err">:</span><span class="mi">42</span><span class="err">:</span><span class="mi">09</span><span class="err">'</span><span class="p">,</span><span class="w">
                    </span><span class="err">'voter':</span><span class="w"> </span><span class="err">'gamer</span><span class="mi">00</span><span class="err">'</span><span class="p">,</span><span class="w">
                    </span><span class="err">'weight':</span><span class="w"> </span><span class="mi">65289</span><span class="p">},</span><span class="w">
                   </span><span class="p">{</span><span class="err">'percent':</span><span class="w"> </span><span class="mi">800</span><span class="p">,</span><span class="w">
                    </span><span class="err">'reputation':</span><span class="w"> </span><span class="err">'</span><span class="mi">7605717819625</span><span class="err">'</span><span class="p">,</span><span class="w">
                    </span><span class="err">'rshares':</span><span class="w"> </span><span class="err">'</span><span class="mi">7561308944</span><span class="err">'</span><span class="p">,</span><span class="w">
                    </span><span class="err">'time':</span><span class="w"> </span><span class="err">'</span><span class="mi">2018-06-01</span><span class="err">T</span><span class="mi">18</span><span class="err">:</span><span class="mi">44</span><span class="err">:</span><span class="mi">51</span><span class="err">'</span><span class="p">,</span><span class="w">
                    </span><span class="err">'voter':</span><span class="w"> </span><span class="err">'markkujantunen'</span><span class="p">,</span><span class="w">
                    </span><span class="err">'weight':</span><span class="w"> </span><span class="mi">90456</span><span class="p">}],</span><span class="w">
  </span><span class="err">'allow_curation_rewards':</span><span class="w"> </span><span class="err">True</span><span class="p">,</span><span class="w">
  </span><span class="err">'allow_replies':</span><span class="w"> </span><span class="err">True</span><span class="p">,</span><span class="w">
  </span><span class="err">'allow_votes':</span><span class="w"> </span><span class="err">True</span><span class="p">,</span><span class="w">
  </span><span class="err">'author':</span><span class="w"> </span><span class="err">'rakibmaruf</span><span class="mi">24</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'author_reputation':</span><span class="w"> </span><span class="err">'</span><span class="mi">115387353393</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'author_rewards':</span><span class="w"> </span><span class="mi">29</span><span class="p">,</span><span class="w">
  </span><span class="err">'beneficiaries':</span><span class="w"> </span><span class="p">[],</span><span class="w">
  </span><span class="err">'body':</span><span class="w"> </span><span class="s2">"How did it worked ? I don't understand about this brother."</span><span class="p">,</span><span class="w">
  </span><span class="err">'body_length':</span><span class="w"> </span><span class="mi">58</span><span class="p">,</span><span class="w">
  </span><span class="err">'cashout_time':</span><span class="w"> </span><span class="err">'</span><span class="mi">1969-12-31</span><span class="err">T</span><span class="mi">23</span><span class="err">:</span><span class="mi">59</span><span class="err">:</span><span class="mi">59</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'category':</span><span class="w"> </span><span class="err">'finland'</span><span class="p">,</span><span class="w">
  </span><span class="err">'children':</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w">
  </span><span class="err">'children_abs_rshares':</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
  </span><span class="err">'created':</span><span class="w"> </span><span class="err">'</span><span class="mi">2018-06-01</span><span class="err">T</span><span class="mi">17</span><span class="err">:</span><span class="mi">56</span><span class="err">:</span><span class="mi">15</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'curator_payout_value':</span><span class="w"> </span><span class="err">'</span><span class="mf">0.018</span><span class="w"> </span><span class="err">SBD'</span><span class="p">,</span><span class="w">
  </span><span class="err">'depth':</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w">
  </span><span class="err">'id':</span><span class="w"> </span><span class="mi">51280699</span><span class="p">,</span><span class="w">
  </span><span class="err">'json_metadata':</span><span class="w"> </span><span class="err">'</span><span class="p">{</span><span class="nl">"tags"</span><span class="p">:[</span><span class="s2">"finland"</span><span class="p">],</span><span class="nl">"app"</span><span class="p">:</span><span class="s2">"steemit/0.1"</span><span class="p">}</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'last_payout':</span><span class="w"> </span><span class="err">'</span><span class="mi">2018-06-08</span><span class="err">T</span><span class="mi">17</span><span class="err">:</span><span class="mi">56</span><span class="err">:</span><span class="mi">15</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'last_update':</span><span class="w"> </span><span class="err">'</span><span class="mi">2018-06-01</span><span class="err">T</span><span class="mi">17</span><span class="err">:</span><span class="mi">56</span><span class="err">:</span><span class="mi">15</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'max_accepted_payout':</span><span class="w"> </span><span class="err">'</span><span class="mf">1000000.000</span><span class="w"> </span><span class="err">SBD'</span><span class="p">,</span><span class="w">
  </span><span class="err">'max_cashout_time':</span><span class="w"> </span><span class="err">'</span><span class="mi">1969-12-31</span><span class="err">T</span><span class="mi">23</span><span class="err">:</span><span class="mi">59</span><span class="err">:</span><span class="mi">59</span><span class="err">'</span><span class="p">,</span><span class="w">
  </span><span class="err">'net_rshares':</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
  </span><span class="err">'net_votes':</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
  </span><span class="err">'parent_author':</span><span class="w"> </span><span class="err">'markkujantunen'</span><span class="p">,</span><span class="w">
  </span><span class="err">'parent_permlink':</span><span class="w"> </span><span class="err">'mein-kampf-gegen-den-loewenzahn-my-struggle-against-dandelions'</span><span class="p">,</span><span class="w">
  </span><span class="err">'pending_payout_value':</span><span class="w"> </span><span class="err">'</span><span class="mf">0.000</span><span class="w"> </span><span class="err">SBD'</span><span class="p">,</span><span class="w">
  </span><span class="err">'percent_steem_dollars':</span><span class="w"> </span><span class="mi">10000</span><span class="p">,</span><span class="w">
  </span><span class="err">'permlink':</span><span class="w"> </span><span class="err">'re-markkujantunen-mein-kampf-gegen-den-loewenzahn-my-struggle-against-dandelions</span><span class="mi">-20180601</span><span class="err">t</span><span class="mi">175605072</span><span class="err">z'</span><span class="p">,</span><span class="w">
  </span><span class="err">'promoted':</span><span class="w"> </span><span class="err">'</span><span class="mf">0.000</span><span class="w"> </span><span class="err">SBD'</span><span class="p">,</span><span class="w">
  </span><span class="err">'reblogged_by':</span><span class="w"> </span><span class="p">[],</span><span class="w">
  </span><span class="err">'replies':</span><span class="w"> </span><span class="p">[],</span><span class="w">
  </span><span class="err">'reward_weight':</span><span class="w"> </span><span class="mi">10000</span><span class="p">,</span><span class="w">
  </span><span class="err">'root_author':</span><span class="w"> </span><span class="err">'markkujantunen'</span><span class="p">,</span><span class="w">
  </span><span class="err">'root_permlink':</span><span class="w"> </span><span class="err">'mein-kampf-gegen-den-loewenzahn-my-struggle-against-dandelions'</span><span class="p">,</span><span class="w">
  </span><span class="err">'root_title':</span><span class="w"> </span><span class="err">'Mein</span><span class="w"> </span><span class="err">Kampf</span><span class="w"> </span><span class="err">Gegen</span><span class="w"> </span><span class="err">Den</span><span class="w"> </span><span class="err">Löwenzahn/My</span><span class="w"> </span><span class="err">Struggle</span><span class="w"> </span><span class="err">Against</span><span class="w"> </span><span class="err">The</span><span class="w"> </span><span class="err">'</span><span class="w">
                </span><span class="err">'Dandelion'</span><span class="p">,</span><span class="w">
  </span><span class="err">'title':</span><span class="w"> </span><span class="err">''</span><span class="p">,</span><span class="w">
  </span><span class="err">'total_payout_value':</span><span class="w"> </span><span class="err">'</span><span class="mf">0.067</span><span class="w"> </span><span class="err">SBD'</span><span class="p">,</span><span class="w">
  </span><span class="err">'total_pending_payout_value':</span><span class="w"> </span><span class="err">'</span><span class="mf">0.000</span><span class="w"> </span><span class="err">STEEM'</span><span class="p">,</span><span class="w">
  </span><span class="err">'total_vote_weight':</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
  </span><span class="err">'url':</span><span class="w"> </span><span class="err">'/finland/@markkujantunen/mein-kampf-gegen-den-loewenzahn-my-struggle-against-dandelions#@rakibmaruf</span><span class="mi">24</span><span class="err">/re-markkujantunen-mein-kampf-gegen-den-loewenzahn-my-struggle-against-dandelions</span><span class="mi">-20180601</span><span class="err">t</span><span class="mi">175605072</span><span class="err">z'</span><span class="p">,</span><span class="w">
  </span><span class="err">'vote_rshares':</span><span class="w"> </span><span class="mi">0</span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre></div></div>

<p>From this result you have access to everything associated to the comments of account including content of comment, timestamp, active_votes, etc., so that you can use in further development of your application with Python.</p>

<p>That’s it!</p>

<h3 id="to-run-the-tutorial">To Run the tutorial</h3>

<ol>
  <li><a href="getting_started.html">review dev requirements</a></li>
  <li><code class="highlighter-rouge">git clone https://gitlab.syncad.com/hive/devportal.git</code></li>
  <li><code class="highlighter-rouge">cd devportal/tutorials/python/09_get_account_comments</code></li>
  <li><code class="highlighter-rouge">pip install -r requirements.txt</code></li>
  <li><code class="highlighter-rouge">python index.py</code></li>
  <li>After a few moments, you should see output in terminal/command prompt screen.</li>
</ol>

<hr />

</section>

</div>
<div class="footer">
  <a href="#">Back to top</a>
</div>
<script>
    document.getElementById("open-nav").addEventListener("click", function () {
        document.body.classList.toggle("nav-open");
    });
</script>
</body>
</html>


<script src="/js/adjust.js"></script>

